<template>
  <div>
    <ul >
      <li ref="Style" v-for="(i,index) in list" :key="index">
        {{ i }}
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: "DataList",
  props: {
    isshow: Boolean
  },
  data() {
    return {
      list: [
        "test1.txt",
        "test2.txt",
        "test3.txt",
        "test4.txt",
        "test5test.txt"
      ]
    }
  },
  created() {
    console.log(this.isshow)
  },
  beforeMount() {

  },
  Update() {
    if (this.isshow === true) {
      console.log(this.isshow)
      // console.log(this.$refs.Style)
      // this.$refs.Style.style.float = "none"
    } else {
      console.log(this.isshow)
      // this.$refs.Style.style.float = "left"
    }
  }
}
</script>

<style scoped lang="less">
ul {
  list-style: none;
  li {
    float: left;
    margin: 20px;
  }
}

</style>